/*
 *  Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 *  This source code is licensed under the MIT license found in the LICENSE
 *  file in the root directory of this source tree.
 *
 */

/*
 *  THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN
 *  VAIN.
 *
 *  @generated
 */
#pragma once

#include <memory>
#include <string>
#include <utility>

#include <folly/Optional.h>
#include <folly/io/IOBuf.h>
#include <mcrouter/lib/carbon/CarbonProtocolReader.h>
#include <mcrouter/lib/carbon/CommonSerializationTraits.h>
#include <mcrouter/lib/carbon/Keys.h>
#include <mcrouter/lib/carbon/ReplyCommon.h>
#include <mcrouter/lib/carbon/RequestCommon.h>
#include <mcrouter/lib/carbon/RequestReplyUtil.h>
#include <mcrouter/lib/carbon/Result.h>
#include <mcrouter/lib/carbon/TypeList.h>
#include <mcrouter/lib/carbon/Variant.h>
#include <mcrouter/lib/carbon/facebook/ThriftUtil.h>
#include <mcrouter/lib/carbon/facebook/ThriftWrapper.h>

#include "mcrouter/lib/carbon/test/gen/gen-cpp2/B_types.h"

#include "mcrouter/lib/network/gen/CommonMessages.h"

#include "graphene/ticket/if/gen-cpp2/ticket_rep_types.h"

namespace carbon {
namespace test {
namespace B {

using TRep = carbon::util::ThriftWrapperStruct<graphene::ticket::cpp2::TicketRep>;

class TestBReply;

class TestBRequest : public carbon::RequestCommon, public carbon::test::B::thrift::TestBRequest {
 public:
  using reply_type = TestBReply;

  static constexpr size_t typeId = 69;
  static constexpr const char* name = "testB";

  TestBRequest() = default;
  TestBRequest(const TestBRequest&) = default;
  TestBRequest& operator=(const TestBRequest&) = default;
  TestBRequest(TestBRequest&&) = default;
  TestBRequest& operator=(TestBRequest&&) = default;
  explicit TestBRequest(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit TestBRequest(folly::IOBuf&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }

  friend class apache::thrift::Cpp2Ops<TestBRequest>;

};

class TestBReply : public carbon::ReplyCommon, public carbon::test::B::thrift::TestBReply {
 public:

  static constexpr size_t typeId = 70;

  TestBReply() = default;
  TestBReply(const TestBReply&) = default;
  TestBReply& operator=(const TestBReply&) = default;
  TestBReply(TestBReply&&) = default;
  TestBReply& operator=(TestBReply&&) = default;
  explicit TestBReply(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<TestBReply>;

};
} // namespace B
} // namespace test
} // namespace carbon

#include "BMessages-inl.h"
